<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BrokenIRC: server_src/sig_handler.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BrokenIRC
   &#160;<span id="projectnumber">0.0.42</span>
   </div>
   <div id="projectbrief">A &#39;not so functionnal&#39; irc server and a WIP client</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_20e5c1c74b8b955148e6b35ac4a0bc4d.html">server_src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">sig_handler.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="server_8h_source.html">../include/server.h</a>&quot;</code><br />
<code>#include &lt;sys/wait.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for sig_handler.c:</div>
<div class="dyncontent">
<div class="center"><img src="sig__handler_8c__incl.png" border="0" usemap="#server__src_2sig__handler_8c" alt=""/></div>
<map name="server__src_2sig__handler_8c" id="server__src_2sig__handler_8c">
<area shape="rect" id="node2" href="server_8h.html" title="../include/server.h" alt="" coords="150,80,277,107"/>
</map>
</div>
</div>
<p><a href="sig__handler_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a4f31a6fd48ee5d4579ae4aaaa3cae285"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sig__handler_8c.html#a4f31a6fd48ee5d4579ae4aaaa3cae285">sig_handler</a> (int signo)</td></tr>
<tr class="separator:a4f31a6fd48ee5d4579ae4aaaa3cae285"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a4f31a6fd48ee5d4579ae4aaaa3cae285"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f31a6fd48ee5d4579ae4aaaa3cae285">&#9670;&nbsp;</a></span>sig_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sig_handler </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>signo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Dummy signal hander to exit server properly on console with CTRL-C </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">signo</td><td>the catched signal type (hit <code>man 2 signal</code>) </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="sig__handler_8c_source.html#l00015">15</a> of file <a class="el" href="sig__handler_8c_source.html">sig_handler.c</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__main_8c_source.html#l00124">main()</a>.</p>
<div class="fragment"><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;{</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;        <span class="keywordflow">if</span> (signo == SIGINT) {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;                printf(<span class="stringliteral">&quot;\nReceived SIGINT\n\tSee u !..\n&quot;</span>);</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;                exit(0);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        }</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;}</div></div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="sig__handler_8c_a4f31a6fd48ee5d4579ae4aaaa3cae285_icgraph.png" border="0" usemap="#sig__handler_8c_a4f31a6fd48ee5d4579ae4aaaa3cae285_icgraph" alt=""/></div>
<map name="sig__handler_8c_a4f31a6fd48ee5d4579ae4aaaa3cae285_icgraph" id="sig__handler_8c_a4f31a6fd48ee5d4579ae4aaaa3cae285_icgraph">
<area shape="rect" id="node2" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="141,5,192,32"/>
</map>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
